package controleur;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.util.ArrayList;
import java.util.HashMap;

import vue.MenuTemplate;

import model.Cellule;
import model.Coordonnee;

public class Template extends MouseAdapter {

	private ArrayList<HashMap<Coordonnee, Cellule>> aMap = null;
	private ArrayList<String> aNom = null;

	public Template(ArrayList<HashMap<Coordonnee, Cellule>> aMap,
			ArrayList<String> aNom) {
		this.aMap = aMap;
		this.aNom = aNom;
	}

	@Override
	public void mousePressed(MouseEvent e) {
		if (ToogleCellule.isTemplate()) {
			ToogleCellule.setTemplate(false, null);
		} else {
			MenuTemplate mT = new MenuTemplate(aMap, aNom);
			mT.show(e.getComponent(), e.getX(), e.getY());
		}
	}
}
